<include file="Public:header"/>
<form action="" method="post">
<div class="form_data">
	<div class="mod_name">
		<span class="name">赠送金额</span>
	</div>
	
	<div class="mod_data">
		<div class="name">用户类型</div>
		<div class="input_data">
			<select name="user_type">
				<option value="student">学生</option>
				<option value="teacher">老师</option>
			</select>
		</div>
	</div>

	<div class="mod_data">
		<div class="name">赠送用户</div>
		<div class="input_data">
			<span class="btn3 win select_user" href="{:U('win_select_user')}?user_type=student" old-url="{:U('win_select_user')}" title="选择用户">选择用户</span>
			<div class="city_id_list" style="display:none">
				<li>
					姓名<input type="hidden" name="user_id" value="">
					<span>X</span>
				</li>
			</div>
		</div>
	</div>
	
	<div class="mod_data">
		<div class="name">账户余额</div>
		<div class="input_data">
			<span class="account_balance price fs_20"></span>
		</div>
	</div>

	<div class="mod_data">
		<div class="name">赠送金额</div>
		<div class="input_data">
			<input type="text" name="money" value="{$info['money']|default='50'}" id="w100" datatype="price" >
		</div>
	</div>
	
	<div class="mod_data">
		<div class="name">备注</div>
		<div class="input_data">
			<textarea name="remark" class="h100" id="w400">{$info['remark']}</textarea>
		</div>
	</div>

	<div class="mod_submit">
		<input type="submit" value="确认充值" class="btn1">
		<input type="button" value="返回" class="btn2" onclick="history.go(-1);">
	</div>
</div>
</form>

<script type="text/javascript">
$(document).ready(function(){
	$("select[name='user_type']").bind('change',function(){
		old_url = $('.select_user').attr('old-url');
		user_type = $(this).val();
		$('.select_user').attr('href',old_url+'?user_type='+user_type);
		$('.city_id_list').html('').hide();
		$('.select_user').show();
		$('.account_balance').text('');
	});
	$('.city_id_list li span').live('click',function () {
		$('.city_id_list').html('').hide();
		$('.select_user').show();
		$('.account_balance').text('');
	});
	$('form').submit(function () {
		user_id = $('.form_data input[name="user_id"]').val();
		if(!user_id){
			msgbox('对不起，请选择要充值的用户！','warn');
			return false;
		}
	});
});
</script>
<include file="Public:footer"/>